﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QueryExtractorInterface
{
    public class NewsQuery
    {
        public News News { get; set; }
        public string Query { get; set; }

        public override bool Equals(object obj)
        {
            if (!(obj is NewsQuery))
            {
                return false;
            }
            return Query == (obj as NewsQuery).Query;
        }

        public override int GetHashCode()
        {
            return Query != null ? Query.GetHashCode() : 0;
        }

        public override string ToString()
        {
            return String.Format("{0} - {1}", this.News != null ? this.News.ID : -1, Query);
        }
    }
}
